﻿using System;
using System.Collections.ObjectModel;

namespace MessagePack.Formatters
{
	// Token: 0x02000015 RID: 21
	public class ReadOnlyCollectionFormatter<T> : CollectionFormatterBase<T, T[], ReadOnlyCollection<T>>
	{
		// Token: 0x06000049 RID: 73 RVA: 0x00002C64 File Offset: 0x00001064
		protected override void Add(T[] collection, int index, T value)
		{
			collection[index] = value;
		}

		// Token: 0x0600004A RID: 74 RVA: 0x00002C6E File Offset: 0x0000106E
		protected override ReadOnlyCollection<T> Complete(T[] intermediateCollection)
		{
			return new ReadOnlyCollection<T>(intermediateCollection);
		}

		// Token: 0x0600004B RID: 75 RVA: 0x00002C76 File Offset: 0x00001076
		protected override T[] Create(int count)
		{
			return new T[count];
		}
	}
}
